package com.izkml.mlyun.hotreload.enums;

/**
 * TODO
 *
 * @author zhangp
 * @version 1.0
 * @date 2025/6/11 0011 10:43
 */
public enum ErrorEnums {

    //-32000 to -32099	Reserved for implementation-defined server-errors.
    SERVER_ERROR("-32000", "服务错误"),

    PARSE_ERROR("-32700", "解析错误，服务器收到无效的 JSON"),

    INVALID_REQUEST("-32600", "无效请求，发送的 JSON 不是有效的请求对象。"),

    METHOD_NOT_FOUND("-32601", "方法未找到，方法不存在或无效。"),

    INVALID_PARAMS("-32602", "无效参数，提供的参数无效。"),

    INTERNAL_ERROR("-32603", "内部错误，JSON-RPC 内部错误");

    private final String code;
    private final String message;

    ErrorEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }
}
